import java.util.ArrayList;

import junit.framework.Assert;
import junit.framework.TestCase;

import org.junit.Test;



public class sortTest extends TestCase{
	
	
	@Test
	public void testType(){
		assertEquals(true, true);
		
		Integer[] array =  DataStreamer.generateUnsortedArray(10, -50, 50);
		System.out.println("Unsorted");
		for(int i = 0; i < array.length; i++)System.out.println("" + array[i]);
		QuickSort.sort(array);
		System.out.println("Sorted");
		for(int i = 0; i < array.length; i++)System.out.println("" + array[i]);
		
		
		
		
	}
	
	
	
	@Test
	public void testSmall() {
		long teststart = System.currentTimeMillis();
		Integer[] array = DataStreamer.generateUnsortedArray(10000, -50, 50);
		Integer[] array2 = array.clone();
		Integer[] array3 = array.clone();
		
		/*
		
		System.out.println("unsorted");
		long startTime = System.nanoTime();
		QuickSort.sort(array);
		System.out.println("quicksortTime: "+ (System.nanoTime()-startTime));
		startTime = System.nanoTime();
		
		array2 = (Integer[]) MergeSort.sort(array2);
		System.out.println("mergesortTime: "+ (System.nanoTime()-startTime));
		startTime = System.nanoTime();
		
		array3 = (Integer[]) InsertionSort.sort(array3);
		System.out.println("insertionsortTime: "+ (System.nanoTime()-startTime));
		
		
		System.out.println("total test time: " + (System.currentTimeMillis()-teststart));
		// TODO Auto-generated method stub
		*/
		
		QuickSort.sort(array);
		QuickSort.sort(array);
		
	}




	
}
